extends ../layout
block content
	div.row
		div.panel.panel-primary
			div.panel-heading
				strong 类别管理
				a(href='/categories/new').btn.btn-success.btn-shadow.btn-sm.margin-left#addCategory 添加
			div.panel-body
				table.table
					tr
						th #
						th 名字
						th 优先级
						th 操作
					-for(var i=0;i<categories.length;i++)
						tr
							td #{i}
							td #{categories[i].name}
							td #{categories[i].priority}
							td
								div.btn-group
									a(_id='#{categories[i]._id}').btn.btn-danger.btn-shadow.btn-sm.removeCategory 删除
									a(href='/categories/#{categories[i]._id}/edit').btn.btn-primary.btn-sm.btn-shadow 编辑

block scripts
	script(type='text/javascript', src='/javascripts/category.js')
